#include <stdbool.h>

int identity_matrix(int* matrix, int size) {

    for(int row = 0; row < size; row += 1) {
        for(int column = 0; column < size; column += 1) {
            if(*matrix++ != (row == column))
                return false;
        }
    }
    return true;
}